<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<title>批发审核</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../res/css/layui.css" media="all">
<link rel="stylesheet" href="../../res/css/cst/snproduction.css" media="all">
<script type="text/javascript" src="../../res/js/jquery-1.11.2.min.js"></script>
</head>
<body>
<div class="demoTable" style="margin-left: 20px; margin-top: 10px;">
		操作人:
		<div class="layui-inline">
			<input class="layui-input" maxlength="8" style="height: 32px;" id="oper" autocomplete="off">
		</div>
		 &nbsp;&nbsp;&nbsp;&nbsp;批发时间：
		<div class="layui-inline">
			<input class="layui-input" style="height: 32px;" name="id" id="date" placeholder="yyyy-MM-dd"  autocomplete="off">
		</div>
		—
		<div class="layui-inline">
			<input class="layui-input" name="id" id="time" style="height: 32px;" placeholder="yyyy-MM-dd"  autocomplete="off">
		</div>
		&nbsp;&nbsp;&nbsp;&nbsp;审核状态:
		<from class="layui-form">
			<div class="layui-inline" style="width: 140px;">
				<select lay-filter="shenhe" id="state" >
					<option value="">请选择</option>
					<option value="1">批发等待审核</option>
					<option value="2">批发审核通过</option>
					<option value="3">批发审核未通过</option>
				</select>
			</div>
		</from>
		&nbsp;&nbsp;<button class="layui-btn" data-type="reload">搜索</button>
	</div>
	<table class="layui-table" lay-data="{ url:'../../wholeSale/findWholesale.action', page:true, id:'idTest'}" lay-filter="demo">
		<thead>
			<tr>
				<th lay-data="{field:'auId',width:230,align:'center'}">流水号</th>
				<th lay-data="{field:'wholeCount',width:110,sort : true, align:'center'}">总数量</th>
				<th lay-data="{field:'wholeSum',width:110,sort : true, align:'center'}">总金额</th>
				<th lay-data="{field:'wholeMan',width:110, align:'center'}">操作人</th>
				<th lay-data="{field:'wholeTime',width:200,sort:true, align:'center'}">批发时间</th>
				<th lay-data="{field:'auState',width:150, align:'center',templet:'#imgTpl'}">审核状态</th>
				<th lay-data="{fixed: 'right',width:225, align:'center', toolbar: '#barDemo'}">操作</th>
			</tr>
		</thead>
	</table>
<script type="text/javascript" id="imgTpl">
{{# if(d.auState == 1) { }}
	<div style="font-weight:bold;">批发等待审核</div>
{{# } else if(d.auState == 2){ }}
	<div style="color:green;font-weight:bold;">批发审核通过</div>
{{# } else if(d.auState == 3){ }}
	<div style="color:red;font-weight:bold;">批发审核未通过</div>
{{# }}}
</script>
<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="detail">批发订单详情</a>
 {{# if(d.auState == 1) { }}
    	<button class="layui-btn layui-btn-xs layui-btn-danger" lay-event="sh">审核</button>
 {{# } else if(d.auState == 2){ }}
   	<button class="layui-btn layui-btn-xs layui-btn-disabled">已审核</button>
 {{# } else if(d.auState == 3){ }}
   	<button class="layui-btn layui-btn-xs layui-btn-disabled">已审核</button>
 {{# }}}
</script>
<!-- 增加或修改的弹框 -->
	<div id="add" style="display: none;">
		<form class="layui-form" id="myform" action="" method="post">
			<input type="hidden" id="idss" name="auId"/>
			<input type="hidden" id="ids" name="allId"/>
			<div class="layui-form-item" style="margin-top: 10px;">
				<label class="layui-form-label">审核部门</label>
				<div class="layui-input-block">
					 <input type="text" id="bumeng" name="auComment" lay-verify="required" placeholder="财政部门" autocomplete="off" class="layui-input layui-disabled" disabled="" style="width: 270px;">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">订单名称</label>
				<div class="layui-input-block">
					<input type="text" id="dingdan" maxlength="20" placeholder="批发订单" autocomplete="off" class="layui-input layui-disabled" disabled="" style="width: 270px;">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">是否通过</label>
				<div class="layui-input-inline" style="width:270px;">
					<select lay-verify="required" lay-filter="isva" id="tg" lay-search=""name="auState">
							<option value="2">是</option>
							<option value="3">否</option>
					</select>
				</div>
			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">审核意见</label>
				<div class="layui-input-block" style="width:270px;">
					<textarea placeholder="请输入内容" maxlength="20" cols="8" name="auIdea" id="yijian" class="layui-textarea" lay-verify="required" required=""></textarea>
				</div>
			</div>
			<div class="layui-form-item" style="margin: 0 auto; width: 350px;">
				<div class="layui-input-block">
					<input type="button" class="layui-btn layui-btn-sm" lay-filter="roleAdd" value="确认" id="tijiao"> 
					<a href="javascript:exit();" class="layui-btn layui-btn-danger layui-btn-sm" id='cancel'>关闭</a>
				</div>
			</div>
		</form>
	</div>
	<script src="../../res/layui.all.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../res/js/zyf/wholeSaleAudit.js"></script>
</body>
</html>